package org.abc.fund.repository.strategy;

import org.abc.fund.entity.strategy.StrategyProfitHistory;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDate;
import java.util.Optional;

public interface StrategyProfitHistoryRepository
    extends JpaRepository<StrategyProfitHistory, Long> {
  Optional<StrategyProfitHistory> findByStrategyIdAndRecordDate(
      Long strategyId, LocalDate recordDate);

  Optional<StrategyProfitHistory> findTopByStrategyIdOrderByRecordDateDesc(Long strategyId);
}
